﻿// <copyright file="DataItem.cs" company="Marcin Wosik">
// Copyright (c) 2010 All Right Reserved
// </copyright>
// <author>Marcin Wosik</author>
// <email>mawo11@gmail.com</email>
// <date>2010-02-25</date>
// <summary></summary>
namespace GameOfLife.Controls
{
    public sealed class DataItem<TEnumType>
    {
        #region Constructors

        public DataItem(string name, TEnumType type)
        {
            this.Name = name;
            this.DataItemType = type;
        }

        #endregion Constructors

        #region Properties

        public string Name
        {
            get; set;
        }

        public TEnumType DataItemType
        {
            get; set;
        }

        #endregion Properties

        #region Methods

        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return true;
            }
            DataItem<TEnumType> temp=obj as DataItem<TEnumType>;
            if (temp != null)
            {
                return this.DataItemType.Equals(temp.DataItemType);
            }
            return base.Equals(obj);
        }

        #endregion Methods
    }
}